package com.pn.service.impl;

import com.pn.entity.Result;
import com.pn.mapper.OutStoreMapper;
import com.pn.model.OutStore;
import com.pn.service.OutStoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OutStoreServiceImpl implements OutStoreService {

    @Autowired
    private OutStoreMapper outStoreMapper;

    /**
     * 添加出库单
     * @param outStore
     * @return
     */
    @Override
    public Result saveOutStore(OutStore outStore) {

        int i = outStoreMapper.insertOutStore(outStore);
        if(i>0){
            return Result.ok("出库单添加成功！");
        }
        return Result.err(Result.CODE_ERR_BUSINESS,"出库单添加失败！");
    }
}
